file(GLOB_RECURSE DIR_SRC
        "./core/*.*"
		"./core/compat/*.*"
        "./widgets/*.*"
        "*.*"
)


# 添加 vlc 库
include_directories("d:/qtprojs/AiV2/AiV2/vlcsdk/include")
find_library (libvlccoreVar libvlccore.lib PATHS d:/qtprojs/AiV2/AiV2/vlcsdk/lib) #
find_library (libvlcVar libvlc.lib PATHS d:/qtprojs/AiV2/AiV2/vlcsdk/lib) #

if (${libvlccoreVar} STREQUAL "libvar-NOTFOUND")
    message (FATAL_ERROR "required libvlccore library but not found!")
else()
    message (STATUS "mymath library found in ${libvar}")
endif()
if (${libvlcVar} STREQUAL "libvar-NOTFOUND")
    message (FATAL_ERROR "required libvlc library but not found!")
else()
    message (STATUS "mymath library found in ${libvar}")
endif()

file(GLOB_RECURSE qt_FILE
    "E:/QtTool/ingret-material-widgets-master/vlc-qt/core/VideoFrame.h"
    "E:/QtTool/ingret-material-widgets-master/vlc-qt/core/VideoFrame.cpp"
    "E:/QtTool/ingret-material-widgets-master/vlc-qt/core/VideoMemoryStream.h"
    "E:/QtTool/ingret-material-widgets-master/vlc-qt/core/VideoMemoryStream.cpp"
)

message (STATUS "--------- ${CMAKE_CURRENT_SOURCE_DIR}")

# 路径太复杂
list(REMOVE_ITEM DIR_SRC "E:/QtTool/ingret-material-widgets-master/vlc-qt/core/VideoFrame.h")
list(REMOVE_ITEM DIR_SRC "E:/QtTool/ingret-material-widgets-master/vlc-qt/core/VideoFrame.cpp")
list(REMOVE_ITEM DIR_SRC "E:/QtTool/ingret-material-widgets-master/vlc-qt/./core/VideoFrame.h")
list(REMOVE_ITEM DIR_SRC "E:/QtTool/ingret-material-widgets-master/vlc-qt/./core/VideoFrame.cpp")

list(REMOVE_ITEM DIR_SRC "E:/QtTool/ingret-material-widgets-master/vlc-qt/core/VideoMemoryStream.h")
list(REMOVE_ITEM DIR_SRC "E:/QtTool/ingret-material-widgets-master/vlc-qt/core/VideoMemoryStream.cpp")
list(REMOVE_ITEM DIR_SRC "E:/QtTool/ingret-material-widgets-master/vlc-qt/./core/VideoMemoryStream.h")
list(REMOVE_ITEM DIR_SRC "E:/QtTool/ingret-material-widgets-master/vlc-qt/./core/VideoMemoryStream.cpp")

# message(${DIR_SRC})
add_library(vlc-qt STATIC ${DIR_SRC} )



find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets Network StateMachine)
target_link_libraries(vlc-qt PUBLIC Qt6::Core Qt6::Gui Qt6::Widgets Qt6::Network Qt6::StateMachine)
